package com.qiyue.admin.repository.base;

import com.qiyue.admin.entity.base.ResourceAuthority;
import com.qiyue.orm.jpa.dao.BaseRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * Created by y747718944 on 2018/2/7
 */
public interface ResourceAuthorityRepsitory  extends BaseRepository<ResourceAuthority,Long>{

    /**
     *  删除对应的 group 的菜单类型
     * @param authorityId
     * @param resourceType
     */
    public void deleteByAuthorityIdAndResourceType(@Param("authority_id")Long authorityId , @Param("resource_type") String resourceType);


    public List<ResourceAuthority> findByAuthorityTypeAndResourceTypeAndAuthorityId(@Param("authority_type")String authorityType,@Param("resource_type") String resourceType ,@Param("authority_id") Long authorityId);
}
